﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Management.master" AutoEventWireup="true"
    CodeFile="agent-target-amount.aspx.cs" Inherits="admin_agent_target_amount" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager runat="server" ID="smgrUser">
    </asp:ScriptManager>
    <div class="contents">
        <table width="100%" cellpadding="3" cellspacing="0" border="0">
            <tr>
                <td colspan="2">
                    <h1>
                        Create / Update CRM Agent Monthly Target</h1>
                </td>
            </tr>
            <asp:UpdatePanel ID="upnlNewAgentTarget" runat="server">
                <ContentTemplate>
                    <tr>
                        <td width="150">
                            <b>Target Year</b>
                        </td>
                        <td>
                            :&nbsp;&nbsp;
                            <asp:DropDownList ID="ddlTargetYear" runat="server">
                                <asp:ListItem Value="2015">2015</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td width="150">
                            <b>User Role</b>
                        </td>
                        <td>
                            :&nbsp;&nbsp;
                            <asp:DropDownList ID="ddlUserRole" runat="server" Width="100" AutoPostBack="true"
                                OnSelectedIndexChanged="ddlUserRole_SelectedIndexChanged">
                                <asp:ListItem Value="-1" Selected="True">Select</asp:ListItem>
                                <asp:ListItem Value="100">Agent</asp:ListItem>
                                <asp:ListItem Value="200">Admin</asp:ListItem>
                            </asp:DropDownList>
                            <asp:RequiredFieldValidator ID="rfvUserRole" runat="server" ValidationGroup="customer"
                                Display="Dynamic" InitialValue="-1" ErrorMessage="*" Text="" Font-Bold="true"
                                Font-Size="X-Large" ControlToValidate="ddlUserRole"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr runat="server" id="trIsRenewal" visible="false">
                        <td width="150">
                            <b>Is Renewal Agent</b>
                        </td>
                        <td>
                            :&nbsp;&nbsp;
                            <asp:DropDownList ID="ddlRenewal" runat="server" Width="100" AutoPostBack="true"
                                OnSelectedIndexChanged="ddlRenewal_SelectedIndexChanged">
                                <asp:ListItem Value="0" Selected="True">No</asp:ListItem>
                                <asp:ListItem Value="1">Yes</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td width="150">
                            <b>Agent</b>
                        </td>
                        <td>
                            :&nbsp;&nbsp;
                            <asp:DropDownList ID="ddlUser" runat="server" Width="100" AutoPostBack="true" OnSelectedIndexChanged="ddlUser_SelectedIndexChanged">
                            </asp:DropDownList>
                            <asp:RequiredFieldValidator ID="rfvUSer" runat="server" ValidationGroup="customer"
                                Display="Dynamic" InitialValue="-1" ErrorMessage="*" Text="" Font-Bold="true"
                                Font-Size="X-Large" ControlToValidate="ddlUser"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td width="150">
                            <b>Name</b>
                        </td>
                        <td>
                            :&nbsp;&nbsp;
                            <asp:Label ID="lblName" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td width="150">
                            <b>Status</b>
                        </td>
                        <td>
                            :&nbsp;&nbsp;
                            <asp:DropDownList ID="ddlStatus" runat="server" Width="100">
                                <asp:ListItem Value="1" Selected="True">Active</asp:ListItem>
                                <asp:ListItem Value="0">Deactive</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td width="150" style="vertical-align: text-top;">
                            <b>Target Amounts</b>
                        </td>
                        <td>
                            <table width="850" cellpadding="3" cellspacing="0" border="0">
                                <tr>
                                    <td width="60">
                                        <b>January</b>
                                    </td>
                                    <td width="120">
                                        :&nbsp;&nbsp;
                                        <asp:TextBox ID="txtJanuary" runat="server" Width="80px" MaxLength="7"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvJanuary" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ControlToValidate="txtJanuary"></asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="revJanuary" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ValidationExpression="^[0-9]+(\.[0-9])?$" ControlToValidate="txtJanuary"></asp:RegularExpressionValidator>
                                    </td>
                                    <td width="60">
                                        <b>February</b>
                                    </td>
                                    <td width="120">
                                        :&nbsp;&nbsp;
                                        <asp:TextBox ID="txtFebruary" runat="server" Width="100px" MaxLength="7"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvFebruary" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ControlToValidate="txtFebruary"></asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="revFebruary" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ValidationExpression="^[0-9]+(\.[0-9])?$" ControlToValidate="txtFebruary"></asp:RegularExpressionValidator>
                                    </td>
                                    <td width="60">
                                        <b>March</b>
                                    </td>
                                    <td width="120">
                                        :&nbsp;&nbsp;
                                        <asp:TextBox ID="txtMarch" runat="server" Width="100px" MaxLength="7"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvMarch" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ControlToValidate="txtMarch"></asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="revMarch" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ValidationExpression="^[0-9]+(\.[0-9])?$" ControlToValidate="txtMarch"></asp:RegularExpressionValidator>
                                    </td>
                                    <td width="60">
                                        <b>April</b>
                                    </td>
                                    <td width="120">
                                        :&nbsp;&nbsp;
                                        <asp:TextBox ID="txtApril" runat="server" Width="100px" MaxLength="7"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvApril" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ControlToValidate="txtApril"></asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="revApril" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ValidationExpression="^[0-9]+(\.[0-9])?$" ControlToValidate="txtApril"></asp:RegularExpressionValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td width="60">
                                        <b>May</b>
                                    </td>
                                    <td width="120">
                                        :&nbsp;&nbsp;
                                        <asp:TextBox ID="txtMay" runat="server" Width="80px" MaxLength="7"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvMay" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ControlToValidate="txtMay"></asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="revMay" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ValidationExpression="^[0-9]+(\.[0-9])?$" ControlToValidate="txtMay"></asp:RegularExpressionValidator>
                                    </td>
                                    <td width="60">
                                        <b>June</b>
                                    </td>
                                    <td width="120">
                                        :&nbsp;&nbsp;
                                        <asp:TextBox ID="txtJune" runat="server" Width="100px" MaxLength="7"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvJune" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ControlToValidate="txtJune"></asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="revJune" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ValidationExpression="^[0-9]+(\.[0-9])?$" ControlToValidate="txtJune"></asp:RegularExpressionValidator>
                                    </td>
                                    <td width="60">
                                        <b>July</b>
                                    </td>
                                    <td width="120">
                                        :&nbsp;&nbsp;
                                        <asp:TextBox ID="txtJuly" runat="server" Width="100px" MaxLength="7"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvJuly" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ControlToValidate="txtJuly"></asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="revJuly" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ValidationExpression="^[0-9]+(\.[0-9])?$" ControlToValidate="txtJuly"></asp:RegularExpressionValidator>
                                    </td>
                                    <td width="60">
                                        <b>August</b>
                                    </td>
                                    <td width="120">
                                        :&nbsp;&nbsp;
                                        <asp:TextBox ID="txtAugust" runat="server" Width="100px" MaxLength="7"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvAugust" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ControlToValidate="txtAugust"></asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="revAugust" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ValidationExpression="^[0-9]+(\.[0-9])?$" ControlToValidate="txtAugust"></asp:RegularExpressionValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td width="60">
                                        <b>September</b>
                                    </td>
                                    <td width="120">
                                        :&nbsp;&nbsp;
                                        <asp:TextBox ID="txtSeptember" runat="server" Width="80px" MaxLength="7"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvSeptember" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ControlToValidate="txtSeptember"></asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="revSeptember" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ValidationExpression="^[0-9]+(\.[0-9])?$" ControlToValidate="txtSeptember"></asp:RegularExpressionValidator>
                                    </td>
                                    <td width="60">
                                        <b>October</b>
                                    </td>
                                    <td width="120">
                                        :&nbsp;&nbsp;
                                        <asp:TextBox ID="txtOctober" runat="server" Width="100px" MaxLength="7"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvOctober" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ControlToValidate="txtOctober"></asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="revOctober" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ValidationExpression="^[0-9]+(\.[0-9])?$" ControlToValidate="txtOctober"></asp:RegularExpressionValidator>
                                    </td>
                                    <td width="60">
                                        <b>November</b>
                                    </td>
                                    <td width="120">
                                        :&nbsp;&nbsp;
                                        <asp:TextBox ID="txtNovember" runat="server" Width="100px" MaxLength="7"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvNovember" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ControlToValidate="txtNovember"></asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="revNovember" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ValidationExpression="^[0-9]+(\.[0-9])?$" ControlToValidate="txtNovember"></asp:RegularExpressionValidator>
                                    </td>
                                    <td width="60">
                                        <b>December</b>
                                    </td>
                                    <td width="120">
                                        :&nbsp;&nbsp;
                                        <asp:TextBox ID="txtDecember" runat="server" Width="100px" MaxLength="7"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvDecember" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ControlToValidate="txtDecember"></asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="revDecember" runat="server" ValidationGroup="customer"
                                            Display="Dynamic" ErrorMessage="*" Text="" Font-Bold="true" Font-Size="X-Large"
                                            ValidationExpression="^[0-9]+(\.[0-9])?$" ControlToValidate="txtDecember"></asp:RegularExpressionValidator>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:Button ID="btnSubmit" runat="server" Text="Submit" Width="80px" ValidationGroup="customer" OnClick="btnSubmit_Click" />&nbsp;
                            <asp:Button ID="btnClear" runat="server" Text="Clear" Width="80px" OnClick="btnClear_Click" />&nbsp;
                            <asp:Button ID="btnNew" runat="server" Text="New" Width="80px" OnClick="btnNew_Click" />&nbsp;
                            <asp:Button ID="btnReLoad" runat="server" Text="ReLoad" Width="80px" OnClick="btnReLoad_Click" />&nbsp;
                            <asp:Button ID="btnView" runat="server" Text="View" Width="80px" OnClick="btnView_Click" />
                            <div style="display: none;">
                                <asp:TextBox ID="txtAction" runat="server" Text="1"></asp:TextBox>
                                <asp:TextBox ID="txtAgentId" runat="server" Text="-1"></asp:TextBox>
                                <asp:TextBox ID="txtActiveStatus" runat="server" Text="1"></asp:TextBox>
                            </div>
                        </td>
                    </tr>
                </ContentTemplate>
            </asp:UpdatePanel>
            <tr>
                <td colspan="2">
                    <asp:Label runat="server" ID="lblError" ForeColor="Red" Font-Bold="true" Font-Size="Large"></asp:Label>
                    <asp:Label runat="server" ID="lblMessage" ForeColor="Green" Font-Bold="true" Font-Size="Large"></asp:Label>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
